﻿using SimpleWorkflow.Core;
using SimpleWorkflow.Data;

namespace SimpleWorkflow.Steps
{
	public abstract class SimpleStep<T> : ISimpleStep where T : ISharedFlowContext
	{
		internal SimpleFlow<T>.RunProxyDelegate RunProxy { get; set; }
		internal FlowContext WorkflowContext { get; set; }

		public T SharedContext
		{
			get { return WorkflowContext.GetValue(new Reference<T>(SimpleFlow<T>.SharedContext)); }
		}

		public abstract void Run();
	}
}
